#4 ✓resolved
Rick DeNatale

Fwd: [RiCal] Another small problem

Reported by Rick DeNatale | May 20th, 2009 @ 08:25 AM | in 0.0.9

From: psm42
Date: Wed, May 20, 2009 at 7:03 AM
Subject: [RiCal] Another small problem
To: RiCal rical_gem@googlegroups.com

Hi Rick and others,

Thanks for the last fix to the Date property value.  I've found
another problem with it that you may want to look at.  With the same
(slightly broken) icalendar file I used before, I've tried this:

cal = RiCal.parse_string(Net::HTTP.get(URI.parse('http://icalx.com/
public/rohanl/Australian32Holidays.ics')))
cal[0].events.each do |e|
 puts e.occurrences(:count => 10).length
end

to exercise RiCal, and get this stack trace:

NoMethodError: undefined method to_datetime' for #<DateTime:<br/> 4908481/2,0,2299161><br/>        from /Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/date.rb:<br/> 141:insend'
       from /Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/date.rb:
141:in method_missing'<br/>        from /Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/<br/> date_time.rb:175:in<=>'
       from /Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/
recurrence_rule/enumeration_support_methods.rb:56:in >'<br/>        from /Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/<br/> recurrence_rule/enumeration_support_methods.rb:56:inexhausted?'
       from /Users/paulsm/Projects/ri_cal/lib/ri_cal/property_value/
recurrence_rule/enumerator.rb:72:in next_occurrence'<br/>        from /Users/paulsm/Projects/ri_cal/lib/ri_cal/<br/> occurrence_enumerator.rb:112:ineach'
       from /Users/paulsm/Projects/ri_cal/lib/ri_cal/
occurrence_enumerator.rb:135:in to_a'<br/>        from /Users/paulsm/Projects/ri_cal/lib/ri_cal/<br/> occurrence_enumerator.rb:135:into_a'
       from /Users/paulsm/Projects/ri_cal/lib/ri_cal/
occurrence_enumerator.rb:154:in occurrences'<br/>        from (irb):9<br/>        from (irb):8:ineach'
       from (irb):8
       from :0

It looks like a similar sort of problem.

--Paul

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A new icalendar data (RFC 2445) gem for Ruby which supports time zones and enumeration of occurrences

Shared Ticket Bins

People watching this ticket

Pages